﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using KitBuilder.DataAccess;
using NHibernate;
using NHibernate.Cfg;
using KitBuilder.Views;


namespace KitBuilder.ManagerComponent
{
    /// <summary>
    /// Interaction logic for StockControl.xaml
    /// </summary>

    public partial class StockControl : UserControl
    {
        public StockControl()
        {
            InitializeComponent();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {

            // Do not load your data at design time.
            // if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
            // {
            // 	//Load your data here and assign the result to the CollectionViewSource.
            // 	System.Windows.Data.CollectionViewSource myCollectionViewSource = (System.Windows.Data.CollectionViewSource)this.Resources["Resource Key for CollectionViewSource"];
            // 	myCollectionViewSource.Source = your data
            // }

            //IQuery query = NHADO.OpenSession().CreateQuery("select * from Stock");
            //stockItemList.ItemsSource = query.List();
        }

        private void stockItemList_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
        {
            MessageBox.Show("end");
        }

        private void stockItemList_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
        {

        }

        private void SC_ImportMenu_KeyUp(object sender, KeyEventArgs e)
        {
            //MessageBox.Show("Keyup");
        }

        private void SC_ImportMenu_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            MessageBox.Show("Mouse leftbutton");

        }

        private void SC_ImportMenu_Click(object sender, RoutedEventArgs e)
        {
            ImportWindow importWizardwindow = new ImportWindow("Stock");
            importWizardwindow.ShowDialog();
        }
    }
}
